package com.woniuxy.moneyapp.client;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.woniuxy.commons.util.Result;
import com.woniuxy.moneyapp.client.param.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(name = "fund",path = "/fundPath",contextId = "LocationClient")
@Component
//第一个是context path 第二个是
public interface YoyaVenueLocationClient {


    @ApiOperation("添加场馆信息")
    @PostMapping("/location/addVenueInRedis")
    Result addVenueInRedis(@RequestBody VenueToFund vf) throws JsonProcessingException;

    @ApiOperation("添加教练信息")
    @PostMapping("/location/addCoachInRedis")
    Result addCoachInRedis(@RequestBody CoachToFund cf) throws JsonProcessingException;


    @ApiOperation("查看场馆和教练信息")
    @PostMapping("/location/VenueAndCoach")
    Result<List<VenueToShow>> VenueAndCoach(@RequestBody FindVenueByCondition vf) throws JsonProcessingException;

    @ApiOperation("更新场馆信息")
    @PostMapping("/location/renewVenueInfo")
    Result renewVenueInfo(@RequestBody VenueToFund vf) throws JsonProcessingException;

    @ApiOperation("更新教练信息")
    @PostMapping("/location//renewCoachInfo")
    Result renewCoachInfo(@RequestBody CoachToFund cf) throws JsonProcessingException;

    @ApiOperation("删除教练信息")
    @GetMapping("/location/deleteCoashInfo")
    Result deleteCoashInfo(@RequestParam Integer cid) throws JsonProcessingException;

    @ApiOperation("删除场馆信息")
    @PostMapping("/location/deleteVenueInfo")
    Result deleteVenueInfo(@RequestParam Integer vid) throws JsonProcessingException;













}
